<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="Content-Type" name="viewport" content="width=device-width, initial-scale=1, text/html;charset=utf-8">
    <title>Cube manage</title></head>
    
<style type="text/css">
    html {
        font-size: 10px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    body {
        font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 15px;
        line-height: 1.42857143;
        color: #ffffff;
        background-color: #222222;
    }

    .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-header:before, .modal-header:after, .modal-footer:before, .modal-footer:after {
        content: " ";
        display: table;
    }

    *:before, *:after {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-header:after, .modal-footer:after {
        clear: both;
    }

    .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-header:before, .modal-header:after, .modal-footer:before, .modal-footer:after {
        content: " ";
        display: table;
    }

    *:before, *:after {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .container {
        margin-right: auto;
        margin-left: auto;
        padding-left: 5px;
        padding-right: 5px;
    }

    @media (min-width: 768px) {
        .container {
            width: 750px
        }
    }

    @media (min-width: 992px) {
        .container {
            width: 970px
        }
    }

    @media (min-width: 1200px) {
        .container {
            width: 1170px
        }
    }

    .nav-tabs {
        border-bottom: 1px solid #464545;
    }

    .nav {
        margin-bottom: 0;
        padding-left: 0;
        list-style: none;
    }

    ul, ol {
        margin-top: 0;
        margin-bottom: 10.5px;
    }

    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    ul, menu, dir {
        display: block;
        list-style-type: disc;
        -webkit-margin-before: 1em;
        -webkit-margin-after: 1em;
        -webkit-margin-start: 0px;
        -webkit-margin-end: 0px;
        -webkit-padding-start: 40px;
    }

    .nav-tabs > li {
        float: left;
        margin-bottom: -1px;
    }

    .nav > li {
        position: relative;
        display: block;
    }

    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
        color: #00bc8c;
        background-color: #222222;
        border: 1px solid #464545;
        border-bottom-color: transparent;
        cursor: default;
    }

    .nav-tabs > li > a, .nav-pills > li > a {
        color: #fff;
    }

    .nav-tabs > li > a {
        margin-right: 2px;
        line-height: 1.42857143;
        border: 1px solid transparent;
        border-radius: 4px 4px 0 0;
    }

    .nav > li > a {
        position: relative;
        display: block;
        padding: 10px 15px;
    }

    a {
        color: #0ce3ac;
        text-decoration: none;
    }

    .alert-warning {
        background-color: #f39c12;
        border-color: #f39c12;
        color: #ffffff;
    }

    .alert {
        padding: 15px;
        margin-bottom: 21px;
        border: 1px solid transparent;
        border-radius: 4px;
    }

    .alert-dismissible {
        padding-right: 35px;
    }

    .alert-dismissable .close, .alert-dismissible .close {
        position: relative;
        top: -2px;
        right: -21px;
        color: inherit;
    }

    button.close {
        padding: 0;
        cursor: pointer;
        background: transparent;
        border: 0;
        -webkit-appearance: none;
    }

    .close {
        text-decoration: none;
        text-shadow: none;
        opacity: 0.4;
    }

    .close {
        float: right;
        font-size: 22.5px;
        font-weight: bold;
        line-height: 1;
        color: #ffffff;
        text-shadow: none;
        opacity: 0.2;
        filter: alpha(opacity=20);
    }

    .close:hover, .close:focus {
        opacity: 1;
    }

    .close:hover, .close:focus {
        color: #ffffff;
        text-decoration: none;
        cursor: pointer;
        opacity: 0.5;
        filter: alpha(opacity=50);
    }

    input, button, select, textarea {
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
    }

    button, html input[type="button"], input[type="reset"], input[type="submit"] {
        -webkit-appearance: button;
        cursor: pointer;
    }

    button, select {
        text-transform: none;
    }

    button {
        overflow: visible;
    }

    button, input, optgroup, select, textarea {
        color: inherit;
        font: inherit;
        margin: 0;
    }

    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
        font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-weight: 400;
        line-height: 1.1;
        color: inherit;
    }

    .alert h4 {
        margin-top: 0;
        color: inherit;
    }

    h4, .h4 {
        font-size: 19px;
    }

    h4, .h4, h5, .h5, h6, .h6 {
        margin-top: 10.5px;
        margin-bottom: 10.5px;
    }

    .alert > p, .alert > ul {
        margin-bottom: 0;
    }

    p {
        margin: 0 0 10.5px;
    }

    .text-center {
        text-align: center;
    }

    h1, .h1 {
        font-size: 39px;
    }

    h1, .h1, h2, .h2, h3, .h3 {
        margin-top: 21px;
        margin-bottom: 10.5px;
    }

    h3, .h3 {
        font-size: 26px;
    }

    .container-fluid {
        margin-right: auto;
        margin-left: auto;
    }

    .btn {
        display: inline-block;
        margin-bottom: 0;
        font-weight: normal;
        text-align: center;
        vertical-align: middle;
        -ms-touch-action: manipulation;
        touch-action: manipulation;
        cursor: pointer;
        background-image: none;
        border: 1px solid transparent;
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 15px;
        line-height: 1.42857143;
        border-radius: 4px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .btn-success {
        color: #ffffff;
        background-color: #00bc8c;
        border-color: #00bc8c;
    }

    .btn-sm, .btn-group-sm > .btn {
        padding: 6px 9px;
        font-size: 13px;
        line-height: 1.5;
        border-radius: 3px;
    }

    .btn {
        border-width: 2px;
    }

    .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
        position: relative;
        min-height: 1px;
    }

    @media (min-width: 992px) {
        .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
            float: left
        }

        .col-md-12 {
            width: 100%
        }

        .col-md-11 {
            width: 91.66666667%
        }

        .col-md-10 {
            width: 83.33333333%
        }

        .col-md-9 {
            width: 75%
        }

        .col-md-8 {
            width: 66.66666667%
        }

        .col-md-7 {
            width: 58.33333333%
        }

        .col-md-6 {
            width: 50%
        }

        .col-md-5 {
            width: 41.66666667%
        }

        .col-md-4 {
            width: 33.33333333%
        }

        .col-md-3 {
            width: 25%
        }

        .col-md-2 {
            width: 16.66666667%
        }

        .col-md-1 {
            width: 8.33333333%
        }

        .col-md-pull-12 {
            right: 100%
        }

        .col-md-pull-11 {
            right: 91.66666667%
        }

        .col-md-pull-10 {
            right: 83.33333333%
        }

        .col-md-pull-9 {
            right: 75%
        }

        .col-md-pull-8 {
            right: 66.66666667%
        }

        .col-md-pull-7 {
            right: 58.33333333%
        }

        .col-md-pull-6 {
            right: 50%
        }

        .col-md-pull-5 {
            right: 41.66666667%
        }

        .col-md-pull-4 {
            right: 33.33333333%
        }

        .col-md-pull-3 {
            right: 25%
        }

        .col-md-pull-2 {
            right: 16.66666667%
        }

        .col-md-pull-1 {
            right: 8.33333333%
        }

        .col-md-pull-0 {
            right: auto
        }

        .col-md-push-12 {
            left: 100%
        }

        .col-md-push-11 {
            left: 91.66666667%
        }

        .col-md-push-10 {
            left: 83.33333333%
        }

        .col-md-push-9 {
            left: 75%
        }

        .col-md-push-8 {
            left: 66.66666667%
        }

        .col-md-push-7 {
            left: 58.33333333%
        }

        .col-md-push-6 {
            left: 50%
        }

        .col-md-push-5 {
            left: 41.66666667%
        }

        .col-md-push-4 {
            left: 33.33333333%
        }

        .col-md-push-3 {
            left: 25%
        }

        .col-md-push-2 {
            left: 16.66666667%
        }

        .col-md-push-1 {
            left: 8.33333333%
        }

        .col-md-push-0 {
            left: auto
        }

        .col-md-offset-12 {
            margin-left: 100%
        }

        .col-md-offset-11 {
            margin-left: 91.66666667%
        }

        .col-md-offset-10 {
            margin-left: 83.33333333%
        }

        .col-md-offset-9 {
            margin-left: 75%
        }

        .col-md-offset-8 {
            margin-left: 66.66666667%
        }

        .col-md-offset-7 {
            margin-left: 58.33333333%
        }

        .col-md-offset-6 {
            margin-left: 50%
        }

        .col-md-offset-5 {
            margin-left: 41.66666667%
        }

        .col-md-offset-4 {
            margin-left: 33.33333333%
        }

        .col-md-offset-3 {
            margin-left: 25%
        }

        .col-md-offset-2 {
            margin-left: 16.66666667%
        }

        .col-md-offset-1 {
            margin-left: 8.33333333%
        }

        .col-md-offset-0 {
            margin-left: 0%
        }
    }

    @media (min-width: 1200px) {
        .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
            float: left
        }

        .col-lg-12 {
            width: 100%
        }

        .col-lg-11 {
            width: 91.66666667%
        }

        .col-lg-10 {
            width: 83.33333333%
        }

        .col-lg-9 {
            width: 75%
        }

        .col-lg-8 {
            width: 66.66666667%
        }

        .col-lg-7 {
            width: 58.33333333%
        }

        .col-lg-6 {
            width: 50%
        }

        .col-lg-5 {
            width: 41.66666667%
        }

        .col-lg-4 {
            width: 33.33333333%
        }

        .col-lg-3 {
            width: 25%
        }

        .col-lg-2 {
            width: 16.66666667%
        }

        .col-lg-1 {
            width: 8.33333333%
        }

        .col-lg-pull-12 {
            right: 100%
        }

        .col-lg-pull-11 {
            right: 91.66666667%
        }

        .col-lg-pull-10 {
            right: 83.33333333%
        }

        .col-lg-pull-9 {
            right: 75%
        }

        .col-lg-pull-8 {
            right: 66.66666667%
        }

        .col-lg-pull-7 {
            right: 58.33333333%
        }

        .col-lg-pull-6 {
            right: 50%
        }

        .col-lg-pull-5 {
            right: 41.66666667%
        }

        .col-lg-pull-4 {
            right: 33.33333333%
        }

        .col-lg-pull-3 {
            right: 25%
        }

        .col-lg-pull-2 {
            right: 16.66666667%
        }

        .col-lg-pull-1 {
            right: 8.33333333%
        }

        .col-lg-pull-0 {
            right: auto
        }

        .col-lg-push-12 {
            left: 100%
        }

        .col-lg-push-11 {
            left: 91.66666667%
        }

        .col-lg-push-10 {
            left: 83.33333333%
        }

        .col-lg-push-9 {
            left: 75%
        }

        .col-lg-push-8 {
            left: 66.66666667%
        }

        .col-lg-push-7 {
            left: 58.33333333%
        }

        .col-lg-push-6 {
            left: 50%
        }

        .col-lg-push-5 {
            left: 41.66666667%
        }

        .col-lg-push-4 {
            left: 33.33333333%
        }

        .col-lg-push-3 {
            left: 25%
        }

        .col-lg-push-2 {
            left: 16.66666667%
        }

        .col-lg-push-1 {
            left: 8.33333333%
        }

        .col-lg-push-0 {
            left: auto
        }

        .col-lg-offset-12 {
            margin-left: 100%
        }

        .col-lg-offset-11 {
            margin-left: 91.66666667%
        }

        .col-lg-offset-10 {
            margin-left: 83.33333333%
        }

        .col-lg-offset-9 {
            margin-left: 75%
        }

        .col-lg-offset-8 {
            margin-left: 66.66666667%
        }

        .col-lg-offset-7 {
            margin-left: 58.33333333%
        }

        .col-lg-offset-6 {
            margin-left: 50%
        }

        .col-lg-offset-5 {
            margin-left: 41.66666667%
        }

        .col-lg-offset-4 {
            margin-left: 33.33333333%
        }

        .col-lg-offset-3 {
            margin-left: 25%
        }

        .col-lg-offset-2 {
            margin-left: 16.66666667%
        }

        .col-lg-offset-1 {
            margin-left: 8.33333333%
        }

        .col-lg-offset-0 {
            margin-left: 0%
        }
    }

    .table {
        width: 100%;
        max-width: 100%;
        margin-bottom: 21px;
    }

    table {
        width: 100%;
        padding: 0;
        table-layout: fixed;
        border-collapse: collapse;
        text-align: center;
        border: none;
        class: table;
    }

    table {
        background-color: transparent;
    }

    table {
        border-collapse: collapse;
        border-spacing: 0;
    }

    .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td {
        border-top: 0;
    }

    .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th {
        background-color: #464545;
    }

    table > thead > tr > th, .table > thead > tr > th, table > tbody > tr > th, .table > tbody > tr > th, table > tfoot > tr > th, .table > tfoot > tr > th, table > thead > tr > td, .table > thead > tr > td, table > tbody > tr > td, .table > tbody > tr > td, table > tfoot > tr > td, .table > tfoot > tr > td {
        border: none;
    }

    .table > thead > tr > th {
        vertical-align: bottom;
        border-bottom: 2px solid #464545;
    }

    .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
        padding: 2px;
        line-height: 1.42857143;
        border-top: 1px solid #464545;
    }

    .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th {
        padding: 8px;
    }

    .alert-success {
        background-color: #00bc8c;
        border-color: #00bc8c;
        color: #ffffff;
    }
    [hidden], template {
        display: none;
    }
    .alert-info {
        background-color: #3498db;
        border-color: #3498db;
        color: #ffffff;
    }

    h2, .h2 {
        font-size: 32px;
    }
    .form-control, input, textarea {
        border: 2px hidden transparent;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .form-control {
        display: block;
        width: 100%;
        height: 45px;
        padding: 10px 3px;
        font-size: 15px;
        line-height: 1.42857143;
        color: #464545;
        background-color: #ffffff;
        background-image: none;
        border: 1px solid #f1f1f1;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
        box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
        -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
        -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    }
    input, button, select, textarea {
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
    }
    button, select {
        text-transform: none;
    }
    button, input, optgroup, select, textarea {
        color: inherit;
        font: inherit;
        margin: 0;
    }
    input, button, select, textarea {
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
    }
    button, select {
        text-transform: none;
    }
    button, input, optgroup, select, textarea {
        color: inherit;
        font: inherit;
        margin: 0;
    }

    .btn {
        border-width: 2px;
    }
    .btn-info {
        color: #ffffff;
        background-color: #3498db;
        border-color: #3498db;
    }
    .progress {
        overflow: hidden;
        height: 21px;
        margin-bottom: 21px;
        background-color: #ebebeb;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
        box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    }
    .progress {
        height: 10px;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    form {
        margin-bottom: 1em;
    }

    .progress.active .progress-bar, .progress-bar.active {
        -webkit-animation: progress-bar-stripes 2s linear infinite;
        -o-animation: progress-bar-stripes 2s linear infinite;
        animation: progress-bar-stripes 2s linear infinite;
    }
    .progress .progress-bar {
        font-size: 10px;
        line-height: 10px;
    }
    .progress-striped .progress-bar, .progress-bar-striped {
        background-image: -webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
        background-image: -o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
        background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
        -webkit-background-size: 40px 40px;
        background-size: 40px 40px;
    }
    .progress-bar {
        float: left;
        width: 0%;
        height: 100%;
        font-size: 13px;
        line-height: 21px;
        color: #ffffff;
        text-align: center;
        background-color: #375a7f;
        -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15);
        box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15);
        -webkit-transition: width 0.6s ease;
        -o-transition: width 0.6s ease;
        transition: width 0.6s ease;
    }

    .progress-bar-danger {
        background-color: #e74c3c;
    }



        /*
        IOS button 
        */
         .al-toggle-button{
            appearance: none;
            -webkit-appearance: none;
            position: relative;
            width: 52px;
            height: 32px;
            background: #dfdfdf;
            border-radius: 16px;
            border: 1px solid #dfdfdf;
            outline: 0;
            box-sizing: border-box;
        }
        .al-toggle-button:checked{
            border-color: #3498db;
            background-color: #3498db;
        }
        .al-toggle-button:before, .al-toggle-button:after{
            content: " ";
            position: absolute;
            top: 0;
            left: 0;
            height: 30px;
            border-radius: 15px;
            transition: transform 0.3s;
            transition: -webkit-transform 0.3s;
            transition: transform 0.3s, -webkit-transform 0.3s;
            -webkit-transition: -webkit-transform 0.3s;
        }
        .al-toggle-button:before{
            width: 50px;
            background-color: #fdfdfd;
        }
        .al-toggle-button:after{
            width: 30px;
            background-color: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }
        .al-toggle-button:checked:before{
            transform: scale(0);
            -webkit-transform: scale(0);
        }
        .al-toggle-button:checked:after{
            transform: translateX(20px);
            -webkit-transform: translateX(20px);
        }

</style>
</head>
<body>
<div class="container">
    <ul class="nav nav-tabs">
        <li><a href="WIFI.html">WIFI</a></li>
        <li><a href="NFC.html">NFC</a></li>
        <li class="active"><a href="RF.html">RF</a></li>
        <li><a href="HID.html">HID</a></li>
        <li><a href="Setup.html">Setup</a></li>
    </ul>

    </br>
    <div class="alert alert-dismissible alert-warning" id="Warning_action">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <h4 class="alert-heading">Warning!</h4>
        <p class="mb-0">This device is only for security research. Please consciously abide by relevant laws and
            regulations.</p>
    </div>

    <div class="alert alert-dismissible alert-success" id="nfc_action" hidden>
        <button type="button" class="close" id="nfc_close">&times;</button>
        <h4 class="alert-heading">NFC</h4>
        <label>EM41xx Tag ID:<label id="nfc_idprint"/></label></br>
        <a href="/NFC.html" class="alert-link">Click to attack</a></label>
    </div>

    <div class="alert alert-dismissible alert-info" id="rf_action" hidden>
        <button type="button" class="close" id="rf_close">&times;</button>
        <h4 class="alert-heading">RF</h4>
        <label>Data:<label id="rf_print"/></label></br>
        <a href="/RF.html" class="alert-link">Click to attack</a></label>
    </div>

    <div class="alert alert-dismissible alert-info" id="rf_action_24l01" hidden>
        <button type="button" class="close" id="rf_close_24l01">&times;</button>
        <h4 class="alert-heading">RF</h4>
        <label>Data:<label id="rf_print_24l01"/></label></br>
        <a href="/RF.html" class="alert-link">Click to attack</a></label>
    </div>


    <h1 class=text-center>Cube RF Manage</h1>
    <h4 class=text-center>Use Cube to detect the security risks of 2.4Ghz, 433Mhz, and 315Mhz device</h4>
    </br>

</div>
<div class="container">
    <div class='container-fluid'>
        <div style="display:inline-block;float:left;"><h2>Sniffer</h2></div>
<!--         <div style="width:28%;display:inline-block">
            <label>Freq</label>
            <input style="text-align: center;text-align-last: center;" type="text" class="form-control is-valid" placeholder="SnifferFreq" value='433920000' id='Smart_freq1' maxlength="9">
        </div>
        <div class="form-group" style="width:28%;display:inline-block">
            <label for="exampleSelect1">Protocol</label>
            <select class="form-control" id='TransmitClass'>
                <option value=1>PT226X</option>
                <option value=2>PT224X</option>
              
                <option value="4">Keeloq</option>
            </select>
        </div>
        <div style="display:inline-block;float:right;margin-top: 22px" >
            <input id="RF_Sniffer" type="checkbox" class="al-toggle-button" checked >
        </div> -->
<!--     </div>
    <div class='container-fluid'> -->
        <div class='row'>
                <div class='col-md-12'>
                    <table class='table'>
                        <thead>
                        <tr class='active'>
                            <th class="text-center">Freq</th>
                            <th class="text-center">Pac</th>
                            <th class="text-center">Modu</th>
                            <th class="text-center">Func</th>
                            <th class="text-center">Data</th>
                            <th class="text-center">Play</th>
                        </tr>
                        </thead>
                        <tbody id="t-sn">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
<div class='container-fluid'>
            <div style="display:inline-block;float:left;"><h2>Transmit</h2>
    </div>
<div style="display:inline-block;float:right;margin-top: 16px">
                    <button onclick="rfTransmitSubmit()" type="submit" class="btn btn-info">Transmit</button>
                </div>
        </div>
        <div>
                <div class="form-group" style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Freq</label>
                    <select class="form-control" id="TransmitFreq">
                        <option value=315>315Mhz</option>
                        <option value=433>433Mhz</option>
                    </select>
                </div>
                <div class="form-group" style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Protocol</label>
                    <select class="form-control" id='TransmitClass'>
                        <option value=1>PT226X</option>
                        <option value=2>PT224X</option>
                        <!-- <option value="3">Keeloq</option> -->
                        <option value="4">LigthBar</option>
                    </select>
                </div>
                </br>
                <div id="h-1" style="display:block;">
                    <div style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Data</label>
                    <input type="text" class="form-control is-valid" placeholder="Data"  id='TransmitData'>
                </div>
                <div style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Func</label>
                    <input type="text" class="form-control is-valid" placeholder="Func"  size="1" id='TransmitFunc' maxlength="1">
                </div>
                </div>
                <div id="LigthBar" style="display:none;">
                    <div style="width:98%;display:inline-block">
                    <label for="exampleSelect1">Data</label>
                    <input type="text" class="form-control is-valid" placeholder="Data"  id='LigthBarData'>
                </div>
                </div>
                <div id='h-2' style="display: none;">
                    <div id="h-1">
                    <div style="width:32%;display:inline-block">
                    <label for="exampleSelect1">Data</label>
                    <input type="text" class="form-control is-valid" placeholder="Transmit Data" id='start_1'>
                </div>
                <div style="width:32%;display:inline-block">
                    <label for="exampleSelect1">Serial</label>
                    <input type="text" class="form-control is-valid" placeholder="Serial Number"  size="1" id='func_2' maxlength="1">
                </div>
                <div style="width:32%;display:inline-block">
                    <label for="exampleSelect1">Func</label>
                    <input type="text" class="form-control is-valid" placeholder="Func"  size="1" id='func_1' maxlength="1">
                </div>
                </div>
            </div>
    <div class='container-fluid'>
            <div style="display:inline-block;float:left;"><h2>Attack</h2>
    </div>

            <div style="display:inline-block;float:right;margin-top: 22px">
<!--                 off<input type="radio" name="RF_attack" value="0" checked>
                on<input type="radio" name="RF_attack" value="1"> -->
                <input name="RF_attack" id='RF_attack' type="checkbox" class="al-toggle-button">
            </div>
    </div>

        <form id="rf_blast" action="/rf_blast_c2" method="post">
            <div>
                <div class="form-group" style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Freq</label>
                    <select class="form-control" id="blast_freq">
                        <option value=315>315Mhz</option>
                        <option value=433>433Mhz</option>
                    </select>
                </div>
                <div class="form-group" style="width:49%;display:inline-block">
                    <label for="exampleSelect1">Protocol</label>
                    <select class="form-control" id="blast_class">
                        <option value=1>PT226X</option>
                        <option value=2>PT224X</option>
                    </select>
                </div>
                </br>


                <div style="width:42%;display:inline-block">
                    <label for="exampleSelect1">Start</label>
                    <input type="text" class="form-control is-valid" placeholder="Start address"  id='start' maxlength="5">
                </div>

                <div style="width:42%;display:inline-block">
                    <label for="exampleSelect1">End</label>
                    <input type="text" class="form-control is-valid" placeholder="Stop address"  id='end' maxlength="5">
                </div>

                <div style="width:13%;display:inline-block">
                    <label for="exampleSelect1">Func</label>
                    <input type="text" class="form-control is-valid" placeholder="Func"  size="1" id='func' maxlength="1">
                </div>

            </div>
        </form>
        <div id="RF_prog_1" class="progress active" style="display: none">
            <div id="RF_prog" class="progress-bar progress-bar-striped progress-bar-danger" role="progressbar"
                 aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
        </div>

    <div class='container-fluid'>
            <div style="display:inline-block;float:left;"><h2>Jamming</h2>
    </div>
    <div style="display:inline-block;float:right;margin-top: 22px">
<!--    off<input type="radio" name="RF_attack" value="0" checked>
        on<input type="radio" name="RF_attack" value="1"> -->
        <input name="RF_Jam" id='RF_Jam' type="checkbox" class="al-toggle-button">
    </div>
    </div>


        <div class="form-group" style="width:100%;display:inline-block" id = "RF_Jam_form">
            <label >Method</label>
            <select class="form-control" id="Jam_class" style="text-align: center;text-align-last: center;">
                <option value=1>Smart</option>
                <option value=2>Rude</option>
            </select>

            <div id=Smart_select>
                <div style="width:49%;display:inline-block">
                    <label>Freq1</label>
                    <input style="text-align: center;text-align-last: center;" type="text" class="form-control is-valid" placeholder="Freq1" value='433920000' id='Smart_freq1' maxlength="9">
                </div>

                <div style="width:49%;display:inline-block;float:right;">
                    <label>Freq2</label>
                    <input style="text-align: center;text-align-last: center;" type="text" class="form-control is-valid" placeholder="Freq2" value='315000000' id='Smart_freq2' maxlength="9">
                </div>
            </div>

            <div id=Rude_select hidden>
                <div style="width:99%;display:inline-block">
                    <label>Freq </label>
                    <input style="text-align: center;text-align-last: center;" type="text" class="form-control is-valid" placeholder="Freq" value='433920000' id='Rude_freq' maxlength="9">
                </div>
            </div>

        </div>
        <div id="RF_Jam_action" hidden>
        </br>

        <input style="background-color:#3498db;border:#3498db;color:#ffffff;text-align: center;text-align-last: center;" type="text" class="form-control is-valid" placeholder="Jam"  id='Jam_string'  onfocus="this.blur();" >
        </div>

<!--         <div id="RF_Jam_action" hidden>
            </br>
            <table class='table'>
            <tr class='active'>
                <th class="text-center" id="Jam_string" >None</th>
            </tr>
            </table>
        </div> -->

        <!--
        <button type="submit" class="btn btn-danger">Transmit</button>
        <div class="form-group" style="width:49%;display:inline-block">
            <label for="exampleSelect1">Freq</label>
            <select class="form-control" id="blast_freq">
                <option value=315>315Mhz</option>
                <option value=433>433Mhz</option>
            </select>
        </div> 
        -->
        </br>



    <form action="/tpms" method="post">
        <div class="container">
            <div class='container-fluid'>
                <div style="display:inline-block;float:left;"><h2>TPMS</h2>
                </div>

                <div style="display:inline-block;float:right;margin-top: 16px">
                    <button type="submit" class="btn btn-info">Send</button>
                </div>
            </div>
            <div class='row'>
                <div class='col-md-12'>
                    <table class='table'>
                        <thead>
                        <tr class='active'>
                            <th class="text-center" style="width: 30%;">ID</th>
                            <th class="text-center">Voltage</th>
                            <th class="text-center">Pre.re</th>
                            <th class="text-center">Temp</th>
                            <th class="text-center">Valve</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td style="vertical-align: middle !important;text-align: center;">

                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width:100%" value="20959185" name="tpms[0][0]" size="8" maxlength="8">
                            </td>
                            <td>
                                <!-- <input type="text"  class="form-control is-valid input-sm" id="VID" placeholder="VID" > -->
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="a0" name="tpms[0][4]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="20" name="tpms[0][5]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="60" name="tpms[0][6]" size="2" maxlength="2">
                            </td>
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="08" name="tpms[0][7]" size="2" maxlength="2">
                            </td>
                            </td>
                        </tr>


                        <tr>
                            <td style="vertical-align: middle !important;text-align: center;">
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width:100%" value="eb107f85" name="tpms[1][0]" size="8" maxlength="8">
                            </td>
                            <td>
                                <!-- <input type="text"  class="form-control is-valid input-sm" id="VID" placeholder="VID" > -->
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="a0" name="tpms[1][4]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="20" name="tpms[1][5]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="60" name="tpms[1][6]" size="2" maxlength="2">
                            </td>
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="08" name="tpms[1][7]" size="2" maxlength="2">
                            </td>
                            </td>
                        </tr>

                        <tr>
                            <td style="vertical-align: middle !important;text-align: center;">
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width:100%" value="F0FB2385" name="tpms[2][0]" size="8" maxlength="8">
                            </td>
                            <td>
                                <!-- <input type="text"  class="form-control is-valid input-sm" id="VID" placeholder="VID" > -->
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="a0" name="tpms[2][4]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="20" name="tpms[2][5]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="60" name="tpms[2][6]" size="2" maxlength="2">
                            </td>
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="08" name="tpms[2][7]" size="2" maxlength="2">
                            </td>
                            </td>
                        </tr>

                        <tr>
                            <td style="vertical-align: middle !important;text-align: center;">
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width:100%" value="2093ef85" name="tpms[3][0]" size="8" maxlength="8">
                            </td>
                            <td>
                                <!-- <input type="text"  class="form-control is-valid input-sm" id="VID" placeholder="VID" > -->
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="a0" name="tpms[3][4]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="20" name="tpms[3][5]" size="2" maxlength="2">
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="60" name="tpms[3][6]" size="2" maxlength="2">
                            </td>
                            </td>
                            <td>
                                <input type="text" class="center-block text-center form-control is-valid input-sm"
                                       style="width: 100%" value="08" name="tpms[3][7]" size="2" maxlength="2">
                            </td>
                            </td>
                        </tr>


                        </tbody>
                    </table>
                    <!--    <input class="center-block  text-center" name="status"  type="checkbox" data-size="mini"> -->
                    <!-- <button type="submit" class="btn btn-primary" style="margin: 0px auto;display: table;">Submit</button> -->

                </div>
            </div>
        </div>
    </form>

</div>
</body>

<script src="js/prompt.js"></script>
<script>

function rfTransmitSubmit() {
    var Class = document.getElementById('TransmitClass').value

    if(Class==4){ //LigthBar
        var Freq = document.getElementById('TransmitFreq').value
        var LigthBarData = document.getElementById('LigthBarData').value
        var ajax = new XMLHttpRequest();
            ajax.open('get','rf_LigthBar?Freq=' + Freq +'&Data=' + LigthBarData);
            ajax.send();
            ajax.onreadystatechange = function () {
                if (ajax.readyState==4 && ajax.status==200) {
                    console.log(ajax.responseText)
                }
            }
    }else if(Class<3){
        var Freq = document.getElementById('TransmitFreq').value
        var Data = document.getElementById('TransmitData').value
        var Func = document.getElementById('TransmitFunc').value
        
        var pd = {
            'Freq': Freq,
            'Data': Data,
            'Func': Func,
            //'Class': Class
        }

        var postd = (function(obj){ 
            var str = "";  
            for(var prop in obj){  
                str += prop + "=" + obj[prop] + "&"  
            }  
            return str;  
            })(pd)
        var ajax = new XMLHttpRequest();
        ajax.open('post','/rf_Transmit');
        ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        ajax.send(postd);
        ajax.onreadystatechange = function () {
            if (ajax.readyState==4 && ajax.status==200) {
                console.log('Transmit success')
            }
        }
    }

}

/*
document.getElementById("RF_Sniffer").addEventListener('click', function(){
    if(this.checked){
        var ajax = new XMLHttpRequest();
        ajax.open('get','RF_Sniffer?action=on' );
        ajax.send();
    }else{
        var ajax = new XMLHttpRequest();
        ajax.open('get','RF_Sniffer?action=off' );
        ajax.send();
    }
});
*/
    
document.getElementById('TransmitClass').addEventListener('change', function() {
    if(this.value === '3') {
        document.getElementById('h-1').style.display = 'none'
        document.getElementById('h-2').style.display = 'block'
    }else if (this.value === '4'){
        document.getElementById('LigthBar').style.display = 'block'
        document.getElementById('h-1').style.display = 'none'
    } else {
        document.getElementById('LigthBar').style.display = 'none'
        document.getElementById('h-1').style.display = 'block'
        document.getElementById('h-2').style.display = 'none'
    }
})

document.getElementById('Jam_class').addEventListener('change', function() {
    if(this.value === '2') {
        document.getElementById('Smart_select').style.display = 'none'
        document.getElementById('Rude_select').style.display = 'block'
    } else {
        document.getElementById('Smart_select').style.display = 'block'
        document.getElementById('Rude_select').style.display = 'none'
    }
})

/*
document.getElementsByName('RF_attack')[0].addEventListener('click', function (e) {
    document.getElementById('rf_blast').style.display = 'block'
    document.getElementById('RF_prog_1').style.display = 'none'
    document.getElementById('RF_prog').style.width = '0%'
    removeProg()
})
document.getElementsByName('RF_attack')[1].addEventListener('click', function (e) {
    document.getElementById('rf_blast').style.display = 'none'
    document.getElementById('RF_prog_1').style.display = 'block'
    getProg()
})*/


document.getElementById("RF_attack").addEventListener('click', function(){
    if(this.checked){
        //document.getElementsByName('RF_attack').checked = true;
        //document.getElementById('RF_attack').checked = false;
        document.getElementById('rf_blast').style.display = 'none'
        document.getElementById('RF_prog_1').style.display = 'block'
        getProg();
    }else{
        document.getElementById('rf_blast').style.display = 'block'
        document.getElementById('RF_prog_1').style.display = 'none'
        document.getElementById('RF_prog').style.width = '0%'
        removeProg();
    }
    
});
var rf_jam_i
document.getElementById("RF_Jam").addEventListener('click', function(){
    if(this.checked){
        document.getElementById("Jam_string").value="None";
        document.getElementById("Jam_string").style.backgroundColor="#3498db";
        //document.getElementById("Jam_string").innerHTML="tset"
        document.getElementById('RF_Jam_form').style.display = 'none'
        document.getElementById('RF_Jam_action').style.display = 'block'

        if(document.getElementById("Jam_class").value=='1'){
            var ajax = new XMLHttpRequest();
            ajax.open('get','rf_jam?'+'class=Smart'+'&freq1='
                +document.getElementById('Smart_freq1').value+'&freq2='
                +document.getElementById('Smart_freq2').value);
            ajax.send();

        rf_jam_i = setInterval(function () {
            var ajax = new XMLHttpRequest();
            ajax.open('get','ajax_rf_jam');
            ajax.send();
            ajax.onreadystatechange = function () {
                if (ajax.readyState==4 && ajax.status==200) {
                    var action = ajax.responseText
                    if(action){
                        document.getElementById("Jam_string").value=action;
                        if(action=="Not Jamming")
                            document.getElementById("Jam_string").style.backgroundColor="#3498db";
                        else 
                            document.getElementById("Jam_string").style.backgroundColor="#e33b3b";
                    }
                }
            }
        }, 200)
        }else if (document.getElementById("Jam_class").value=='2'){
            var ajax = new XMLHttpRequest();
            ajax.open('get','rf_jam?'+'class=Rude'+'&freq='+
                document.getElementById('Rude_freq').value);
            ajax.send();
            document.getElementById("Jam_string").style.backgroundColor="#e33b3b";
            document.getElementById("Jam_string").value="RudeJamming...";
        }  
        /*
        var ajax = new XMLHttpRequest();
            ajax.open('get','rf_Jam_action?'+'on');
            ajax.send();*/


    }else{
        var ajax = new XMLHttpRequest();
        ajax.open('get','rf_jam_stop');
        ajax.send();
        document.getElementById('RF_Jam_form').style.display = 'block'
        document.getElementById('RF_Jam_action').style.display = 'none'
        clearInterval(rf_jam_i)
    }
    
});



var s
function removeProg(){
    clearInterval(s)
}

function getProg() {
        var blast_freq = document.getElementById('blast_freq').value
        var blast_class = document.getElementById('blast_class').value
        var start = document.getElementById('start').value
        var end = document.getElementById('end').value
        var func = document.getElementById('func').value
        var pd = {
            'freq': blast_freq,
            'class': blast_class,
            'start':start,
            'end': end,
            'func': func
        }

        var postd = (function(obj){  
            var str = "";  
   
            for(var prop in obj){  
                str += prop + "=" + obj[prop] + "&"  
            }  
            return str;  
            })(pd)
        var ajax = new XMLHttpRequest();
        ajax.open('post','/rf_blast_c2');
        ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        ajax.send(postd);
        ajax.onreadystatechange = function () {
            if (ajax.readyState==4 && ajax.status==200) {
                console.log('success')
            }
        }
    s = setInterval(function () {
        var ajax = new XMLHttpRequest();
        ajax.open('get','ajax_rf_prog');
        ajax.send();
        ajax.onreadystatechange = function () {
            if (ajax.readyState==4 && ajax.status==200) {
                var prog = ajax.responseText
                document.getElementById('RF_prog').style.width = prog + '%'
                if(prog === '100') {
                    document.getElementById('rf_blast').style.display = 'block'
                    document.getElementById('RF_prog_1').style.display = 'none'
                    document.getElementById('RF_prog').style.width = '0%'
                    document.getElementById('RF_attack').checked = false
                    clearInterval(s)
                }
            }
        }
    }, 1000)
}

function rf_Replay(i) {
var ajax = new XMLHttpRequest();
        ajax.open('get','rf_Replay?num=' + i);
        ajax.send();
        ajax.onreadystatechange = function () {
            if (ajax.readyState==4 && ajax.status==200) {
                console.log(ajax.responseText)
            }
        }
}

function rflist(){
    var ajax = new XMLHttpRequest();
        ajax.open('get','rf.json');
        ajax.send();
        ajax.onreadystatechange = function () {
            if (ajax.readyState==4 && ajax.status==200) {
                var prog = JSON.parse(ajax.responseText)
                var data = prog.rf
                var html = ''
                for (var i = 0; i < data.length; i++) {
                    html += "<tr><td>" + data[i].f + "</td>"
                    html += "<td>" + data[i].p + "</td>"
                    html += "<td>" + data[i].m + "</td>"
                    html += "<td>" + data[i].func + "</td>"
                    html += "<td>" + data[i].d + "</td>"
                    html += "<td><button class='btn btn-info' style='padding:0 5px;font-size:10px;' id=" + data[i].i + " onclick=rf_Replay(" + data[i].i + ")>Replay</button></td></tr>"
                }
                document.getElementById('t-sn').innerHTML = html
            }
        }

}
rflist();


</script>
</html>
